import { serviceApi } from '@/config/axios/service'

// 查询列表
export const getAnnountCementListApi = (params: any): Promise<IResponse> => {
  return serviceApi({ url: '/sys/annountCement/list', params })
}
// 添加
export const postAnnountCementAddApi = (data: any): Promise<LoginResponse> => {
  return serviceApi({ method: 'post', url: '/sys/annountCement/add', data })
}
// 添加
export const postAnnountCementEditApi = (data: any): Promise<LoginResponse> => {
  return serviceApi({ method: 'post', url: '/sys/annountCement/edit', data })
}
// 删除
export const delIdApi = (params: any): Promise<IResponse> => {
  return serviceApi({ method: 'DELETE', url: '/sys/annountCement/delete', params })
}
// 删除id批量
export const deleteBatchIdApi = (params: any): Promise<IResponse> => {
  return serviceApi({ method: 'DELETE', url: '/sys/annountCement/deleteBatch', params })
}
// 发布
export const doReleaseDataIdApi = (params: any): Promise<LoginResponse> => {
  return serviceApi({ method: 'GET', url: '/sys/annountCement/doReleaseData', params })
}
// 撤销
export const doReovkeDataIdApi = (params: any): Promise<LoginResponse> => {
  return serviceApi({ method: 'GET', url: '/sys/annountCement/doReovkeData', params })
}
//导出
export const dictExportXls = (url, params): Promise<exportResponse> => {
  const headers = {
    'Content-Type': 'application/x-www-form-urlencoded'
  }
  return serviceApi({
    method: 'GET',
    url,
    params,
    responseType: 'blob',
    headers: headers
  })
}
